<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[scenario]" value="add">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" type="text" name="row[name]" title="" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('封面图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover_url" class="form-control" type="text"  name="row[cover_url]" value="" title="" data-rule="required">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cover_url" class="btn btn-danger faupload" data-input-id="c-cover_url" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-cover_url"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-cover_url" class="btn btn-primary fachoose" data-input-id="c-cover_url" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover_url"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-cover_url"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('营业开始')}:</label>
        <div class="col-xs-12 col-sm-3">
            <input id="c-start_time" class="form-control datetimepicker" type="text" name="row[start_time]" value="09:00" title="" data-date-format="HH:mm">
        </div>
        <label class="control-label col-xs-12 col-sm-2">{:__('营业结束')}:</label>
        <div class="col-xs-12 col-sm-3">
            <input id="c-end_time" class="form-control datetimepicker" type="text" name="row[end_time]" value="23:00" title="" data-date-format="HH:mm">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所在地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-address" class="form-control" type="text" name="row[address]" title="">
                <span class="input-group-addon no-border no-padding" style="width: 80px;">
                    <input id="c-longitude" class="form-control" type="text" name="row[longitude]" title="" placeholder="经度">
                </span>
                <span class="input-group-addon no-border no-padding" style="width: 80px;">
                    <input id="c-latitude" class="form-control" type="text" name="row[latitude]" title="" placeholder="纬度">
                </span>
                <span class="input-group-addon no-border no-padding">
                    <button type="button" class="btn btn-primary" data-toggle="addresspicker" data-input-id="c-address" data-lng-id="c-longitude" data-lat-id="c-latitude">选择地址</button>
                </span>
                <span class="msg-box n-right"></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('联系方式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contact" class="form-control" type="text" name="row[contact]" title="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('点餐码背景')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-desk_image" class="form-control" type="text"  name="row[desk_image]" value="/assets/addons/yunfood/img/desk_bg.png" title="" data-rule="required">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-desk_image" class="btn btn-danger faupload" data-input-id="c-desk_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-desk_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-desk_image" class="btn btn-primary fachoose" data-input-id="c-desk_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-desk_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-desk_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('授权管理员')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[admin_ids][]', $adminList, null, ['class'=>'form-control selectpicker', 'multiple'=>''])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('权重')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" class="form-control" type="number" name="row[weight]" title="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', $statusList, null, ['class'=>'form-control selectpicker'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button class="btn btn-success btn-embossed disabled" type="submit">{:__('OK')}</button>
            <button class="btn btn-default btn-embossed" type="reset">{:__('Reset')}</button>
        </div>
    </div>
</form>